package cn.miju.admin.framework.content;

/**
 * <pre>
 * 业务类
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-03-01 14:56
 */
public enum CodeMessage {
    //成功
    SUCCESS(0, "业务办理成功！"),
    //失败
    FAIL(-1, "业务办理失败！"),
    //参数校验失败
    VALIDATE_FAIL(-5, "参数校验失败！"),
    SQL_FAIL(-9, "SQL执行异常，请联系管理员！"),
    //非法请求
    REQUEST_ILLEGAL(-11, "无效请求，请重新登录！"),
    //访问超时
    VISIT_TIMEOUT(-12, "访问超时，请重新登录！"),
    //登录用户不存在
    LOGIN_USET_NOT_EXIT(-21, "账号不存在/类型有误！"),
    //登录密码输入错误
    LOGIN_PASSWORD_FAIL(-22, "登录密码输入错误！"),
    //注册用户已存在
    REGISTER_USET_EXIT(-23, "用户名已存在，请重新输入！"),
    ;

    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    CodeMessage(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
